﻿using System;
using System.ServiceModel.Syndication;
using System.Xml;

namespace YAWD.Utils
{
    class rssReader
    {
        public static SyndicationItem read(Uri site)
        {
            SyndicationItem objVersion = null;

            XmlReader reader = XmlReader.Create(site.ToString());
            SyndicationFeed feed = SyndicationFeed.Load(reader);

            foreach (SyndicationItem item in feed.Items)
            {
                objVersion = item;
                break;
            }

            reader.Close();

            return objVersion;
        }
    }
}
